package io.renren.service;

import io.renren.entity.DrivingLicense;
import io.renren.entity.UserDrivingLicense;
import io.renren.entity.UserReservation;
import io.renren.entity.Vehicle;
import io.renren.entity.VioViolationDto;
import io.renren.po.*;
import io.renren.vo.*;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * \
 * 交管业务
 *
 * @author Administrator
 */
public interface PoliceService {

    /**
     * 根据输入信息查询违法细则
     *
     * @param inputText
     * @return
     */
    List<IllegalCode> queryillegalInfo(String inputText);

    /**
     * 上传随手拍
     *
     * @param shootReq
     * @return
     */
    int createShoot(ShootReq shootReq);

    /**
     * 查询拍摄图片集合带分页
     *
     * @param imageType
     * @param page
     * @param limit
     * @return
     */
    Pager<ShootRes> queryShootList(String imageType, int page, int limit);


    /***************************************************违章车辆************************************************/
    /**
     * 查询违法车辆排行榜
     *
     * @param illegalType
     * @return
     */
    IllegalVehicleList queryIllegalVehicle(String illegalType);

    /**
     * 查询违法车辆历史时间集合
     *
     * @param illegalVehicleReq
     * @return
     */
    IllegalVehicleHistryRes queryIllegalVehicleHistry(IllegalVehicleReq illegalVehicleReq);

    /**
     * 根据时间查询具体某一时间车辆违法排行榜
     *
     * @param illegalVehicleReq
     * @return
     */
    IllegalVehicleList queryIllegalVehicleHistryInfo(IllegalVehicleReq illegalVehicleReq);

    /**
     * 查询违法车辆排行榜内容明细
     *
     * @param id
     * @return
     */
    IllegalVehicleResp queryIllegalVehicleInfo(int id);


    /***************************************************违法高发路口************************************************/

    /**
     * 根据年月查询违法闯红灯高发路口
     *
     * @return
     */
    IllegalCrossingInfoList queryIllegalCrossing();

    /**
     * 查询违法闯红灯高发路口历史记录
     *
     * @param collectionTime
     * @return
     */
    IllegalHistoryRedLightRes queryIllegalHistry(long collectionTime);


    /**
     * 查询违法闯红灯高发路口历史记录
     *
     * @param collectionTime
     * @return
     */
    IllegalCrossingInfoHistryList queryIllegalHistryInfo(long collectionTime);

    /**
     * 查询事故列表
     *
     * @param id
     * @return
     */
    IllegalCrossingInfo queryIllegalInfo(int id);

    /***************************************************事故高发路口************************************************/

    /**
     * 通过年月查询事故高发路口
     *
     * @return
     */
    RoadAccidentInfoList queryRoadAccidents();


    /**
     * 查询事故高发路口历史列表
     *
     * @param collectionTime
     * @return
     */
    IllegalHistoryRoadRes queryAccidentsHistry(long collectionTime);

    /**
     * 查询事故高发路口历史详细
     *
     * @param collectionTime
     * @return
     */
    RoadAccidentInfoList queryAccidentsHistryInfo(long collectionTime);

    /**
     * 查询事故高发路口详细
     *
     * @param id
     * @return
     */
    RoadAccidentInfo queryRoadAccidentsInfo(int id);

    List<UserVehiclePO> getVehicleList(String userid);

    List<UserVehiclePODto> getAppVehicleList(String userid);

    RespModel saveReservationVehicle(UserVehiclePO userVehiclePO);

    /**
     * 查询用户信誉积分 预约订单 车辆有效期
     *
     * @param userVehiclePO
     * @return
     */
    RespModel<Map> getReservationBasicInfo(UserVehiclePO userVehiclePO);

    List<Map> getCheckSiteList();

    List<Map> queryCheckSiteServiceProject(String company_id);


    /**
     * 查询用户可预约时间列表
     *
     * @param userReservation
     * @return
     */
    RespModel getReservationTimeList(UserReservation userReservation);

    RespModel submitReservationTime(UserReservation userReservation);

    List<Map> queryReservationRecord(String license_plate, String userid);

    /**
     * 用户取消预约
     *
     * @param userReservation
     * @return
     */
    @Transactional
    RespModel cancelReservationTime(UserReservation userReservation);

    Integer updateReservationArrive(UserReservation userReservation);

    Integer deleteUserVehicle(String userid, String license_plate);

    /**
     * 获取驾驶证信息
     * @param userid
     * @return
     */
    RespModel getDrivingLicense(String userid);

    /**
     * 删除驾驶证信息
     * @param userid
     * @return
     */
    Integer deleteUserDrivingLicense(String userid);

    /**
     * 保存驾驶证信息
     * @param userDrivingLicense 驾驶证信息
     * @return
     */
    RespModel saveUserDrivingLicense(UserDrivingLicense userDrivingLicense);

    /**
     * 根据号牌号码查询违法信息
     * @param vehicle 号牌号码
     * @return
     */
    RespModel getVioViolationList(Vehicle vehicle);

    /**
     * 获取其他人的驾驶证信息
     * @param drivingLicense
     * @return
     */
    RespModel<UserDrivingLicense> getOthersDrivingLicense(DrivingLicense drivingLicense);

    /**
     * 获取其他人的机动车信息
     * @param vehicle
     * @return
     */
    RespModel<Vehicle> getOthersVehicle(Vehicle vehicle);
}
